package org.ctstudio.oa.duty.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.ctstudio.oa.duty.bean.Staff;
import org.ctstudio.oa.duty.bean.StaffQuery;

@Mapper
public interface StaffMapper {
  List<Staff> getAll();

  List<Staff> query(StaffQuery query);

  long count(StaffQuery query);

  Staff getById(long id);

  Staff getByStaffId(String staffId);

  List<Staff> getByStaffIds(List<String> staffIds);

  int add(Staff staff);

  int del(long id);

  int edit(Staff staff);

  int editPassword(String uid, String newPwd);

  int addUserRole(String uid, String roleName);

  int delUserRole(String uid, String roleName);
}
